package com.tt.qiyuesuo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @author tiantao
 * @date 2022/2/22 16:19
 */
@Repository
@Data
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class FileInfo {
    //value与数据库主键列名一致，若实体类属性名与表主键列名一致可省略value
    @TableId(value = "id", type = IdType.AUTO)//指定自增策略
    Long id;
    Long size;
    String path;
    String newFileName;
    String originalFileName;
    Date creatTime;

    @Override
    public String toString() {
        return "FileInfo{" +
                "id=" + id +
                ", size=" + size + "KB" +
                ", path='" + path + '\'' +
                ", newFileName='" + newFileName + '\'' +
                ", originalFileName='" + originalFileName + '\'' +
                ", creatTime=" + creatTime +
                '}';
    }
}
